package com.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 【人事合同管理】 车辆信息
 */

@Entity
@Table(name = "employee")
@Getter @Setter @NoArgsConstructor
public class Employee extends BaseEntity {

    @Column(name = "name")
    private String name;

    @Column(name = "age")
    private Integer age;

    @Column(name = "gender")
    private String gender; // 1-男，2-女

    @Column(name = "position")
    private String position;

    @Column(name = "status", columnDefinition = "TINYINT default 1")
    private Integer status; // 1-在职，2-离职

    private String contractName;

    @Column(name = "start_date", nullable = false)
    @Temporal(TemporalType.DATE)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date startDate;

    @Column(name = "end_date")
    @Temporal(TemporalType.DATE)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date endDate;

}